package com.example.pcl.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * <p>
 * 心理健康知识表，存储与心理健康相关的知识内容
 * </p>
 *
 * @author xx
 * @since 2024-12-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("mental_health_knowledge")
@Schema(name = "MentalHealthKnowledge对象", description = "心理健康知识表，存储与心理健康相关的知识内容")
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class MentalHealthKnowledge implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "知识ID")
    @TableId(value = "knowledge_id", type = IdType.AUTO)
    private Integer knowledgeId;

    @Schema(description = "知识标题")
    private String title;

    @Schema(description = "知识内容")
    private String content;

    @Schema(description = "知识类别（例如：情绪管理、压力缓解等）")
    private String category;

    @Schema(description = "知识来源")
    private String source;

    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @Schema(description = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    @Schema(description = "封面url")
    private String coverUrl;

    @Schema(description = "视频url 如果是视频内容")
    private String videoUrl;

    @Schema(description = "知识类型（0：文章，1：视频）")
    private Integer type;

    public static final Integer TEXT = 0;
    public static final Integer VIDEO = 1;

}
